package com.demo.starter;

import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.PostConstruct;
import java.util.Date;

@MapperScan({"com.demo.starter.repository"})
@SpringBootApplication
public class Application {
	
	private final static Logger LOGGER = LoggerFactory.getLogger(Application.class);
	
	@PostConstruct
    public void logSomething() {
		Date now = new Date(System.currentTimeMillis());
		LOGGER.debug("Application startup at {} with debug log level...", now);
		LOGGER.info("Application startup at {} with info log level...", now);
		LOGGER.warn("Application startup at {} with warn log level...", now);
		LOGGER.error("Application startup at {} with error log level...", now);
    }

	public static void main(String[] args) {
		SpringApplication.run(Application.class, args);
	}

}
